package com.aos.erp.schools.rest.index;

import com.aos.erp.common.bean.ResultEntity;
import com.aos.erp.schools.service.index.IndexQueryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 车管所，首页数据查询
 * </p>
 *
 * @author 杨文博
 * @since 2018-12-02
 */
@Slf4j
@RestController(value = "DivisionIndexController")
@RequestMapping("/api/index")
@Api(value="车管所，首页数据查询",tags={"车管所，首页数据查询"})
public class IndexQueryController {

	@Autowired
	private IndexQueryService indexQueryService;


	@PostMapping("/divisionStudent")
	@ApiOperation(value = "获取当前登录车管所学员报名数量")
	public ResultEntity selectDivisionStudent(String currentUserId) throws Exception {
		Long count=indexQueryService.selectDivisionStudent(currentUserId);
		return ResultEntity.success(count);
	}

//
//	@PostMapping("/studentByCityCode")
//	@ApiOperation(value = " 根据城市Code查询学员")
//	@ApiImplicitParam(name = "cityCode",value = "城市Code",required = true,dataType ="String",paramType ="query" )
//	public ResultEntity studentByCityCode(String cityCode,String currentUserId) throws Exception {
//		UserUtil.getUserDepCode(currentUserId);
//		Long count=indexQueryService.studentByCityCode(cityCode);
//		return ResultEntity.success(count);
//	}



}

